namespace I2.Loc
{
	public static class ScriptLocalization
	{
		public static string Get(string Term, bool FixForRTL = false)
		{
			return LocalizationManager.GetTermTranslation(Term, FixForRTL);
		}

		public static void SetMissionLocalizatiion(MissionBase mission)
		{
			string empty = string.Empty;
			string term = string.Format("new_Missions/{0}_a_title", mission.gameObject.name);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				mission.title = empty;
			}
			term = string.Format("new_Missions/{0}_b_start", mission.gameObject.name);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				mission.msgManualStart = empty;
			}
			term = string.Format("new_Missions/{0}_c_end", mission.gameObject.name);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				mission.msgManualEnd = empty;
			}
		}

		public static string GetProfileLocalizationText(string name)
		{
			string empty = string.Empty;
			string term = string.Format("Lobby_PanelProffile/{0}", name);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				return empty;
			}
			return name;
		}

		public static string GetGameEventLocalizationText(string eventName)
		{
			string empty = string.Empty;
			string term = string.Format("Gameplay_Event_Message/{0}", eventName);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				return empty;
			}
			return eventName;
		}

		public static string GetReputationLocalizationText(string name)
		{
			string empty = string.Empty;
			string term = string.Format("Game_Reputation/{0}", name);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				return empty;
			}
			return name;
		}

		public static string GetGameCommonLocalizationFormat(string name)
		{
			string empty = string.Empty;
			string term = string.Format("Game_Common/{0}", name);
			empty = Get(term);
			if (!string.IsNullOrEmpty(empty))
			{
				return empty;
			}
			return name;
		}
	}
}
